package com.xr.blackhoole.autoconfigurer.feign;

import com.xr.blackhoole.fegin.interceptor.BlackholeFeignRequestInterceptor;
import feign.RequestInterceptor;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@ConditionalOnClass(RequestInterceptor.class)
public class BlackholeFeginAutoConfiguration {
    
    @ConditionalOnClass
    @Bean
    public RequestInterceptor blackholeFeignRequestInterceptor(){
        return new BlackholeFeignRequestInterceptor();
    }
}
